<?php

/**
 * @author christian
 * @copyright 2011
 * @abstract carga de todo el itinerario que es parte de un tour del itenario del tour
 */
 


$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDTour";
include_once("$ruta/conf/CConfig.php");
include_once("$ruta/elements/head.tpl");
include_once("$ruta/MDTourGeneral/CTourTableDraw.php");
include_once("$ruta/MDTourGeneral/CDrawPageReg.php");
include_once("$ruta/MDExtensiones/CExtensionesTable.php");
include_once("$ruta/star.php");
include_once("$ruta/view/CDrawMenuTour.php");

$items=array("Nuevo Tour"=>"/MDTourGeneral/CSmallDefinePack.php","Nuevo paquete"=>"CTourEdit.php?codigo=159&default=2","Ver paquetes"=>"/viventura/MDTour/","Otra"=>"g");

CDrawMenuTour::getInstance()->setMenu($items);
CDrawMenuTour::getInstance()->rigth_side_begin();//empieza lado derecho 
CDrawMenuTour::getInstance()->DrawDivAdBegin("content_area_user_title","1");echo "<h1>Destino Sur</h1>";




$title="Tour";
$maintable="tour"; 
$growtable="pack_has_tour";


if (!isset($_POST['updated'])) {$_POST['updated'] = "NULL"; }
$updated = $_POST['updated'];
if($updated!="NULL"){echo "El paquete $updated fue actualizado";}
else{echo "";}

$columnas=array("idExt"=>"Identificador","NomExt"=>"Nombre de la extensión","OpeExt"=>"Operador","DesExt"=>"Descripción","PriExt"=>"Precio");
//CTourTableDraw::getInstance()->DrawTable($title,$maintable,$columnas);
CExtensionesTable::getInstance()->DrawTable($title,$maintable,$growtable,$columnas);

/////////////////Area de registro /////////////////////
CDrawPageReg::getInstance()->DrawHideSectionBeg();
    
    echo "<p align='center'>";
    $action="CRegistroExtensiones.php?default=1";$name="formulario_registro";$method="post";$NAME="Registro de paquete turístico";
    CDrawPageReg::getInstance()->DrawHead($action,$name,$method,$NAME);
    echo "</p>";
    CDrawPageReg::getInstance()->readOnly("extensiones","idExt");
    
    echo "<h2>Operador</h2>";
    echo "<div id='dashboard_info'>";

    $campos = array("idOpe"=>"idOpe", "NamOpe"=>"NamOpe");
    CDrawPageReg::getInstance()->DrawSelect("operador", $campos, "Asignar a operador","idOpe");

    echo "</div>";
    
    $extensiones=array("NomExt"=>"Nombre de la extensión","DesExt"=>"Descripción","PriExt"=>"Precio");
    $val_extensiones = array (":required",":required",":required");
    

    CDrawPageReg::getInstance()->DrawTextBox($extensiones,$val_extensiones);
      
    echo "<p align='right'>";

    CDrawPageReg::getInstance()->DrawSubmmit("Añadir");
    echo "</p>";
    echo "</div>";


 CDrawPageReg::getInstance()->DrawHideSectionEnd("Añadir paquete / Ocultar");

CDrawPageReg::getInstance()->DrawFoot();


CDrawMenuTour::getInstance()->rigth_side_end();

       CDrawPageReg::getInstance()->DrawButton("Ver lista de TC y guías","index.php");
       
      
   
CDrawMenuTour::getInstance()->DrawDivAdEnd();

////////////Fin del area de registro////////////////
?>